<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>My JSP 'user_view.jsp' starting page</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->

  </head>
   
  <body>
    This is my JSP page. 
    <a href="<%=request.getContextPath()%>/listUser.action">list</a>
    <a href="<%=request.getContextPath()%>/modifyUser.action?userNo=<s:property value="userNo"/>">modify</a>
    <br>
    <s:set id="info" value="#request.userInfo"></s:set>
    <table>
    <tr>
    <td>userId:</td>
    <td><s:property value="#info.user_id"/></td>
    </tr>
    <tr>
    <td>userPassword:</td>
    <td><s:property value="#info.user_password"/></td>
    </tr>
    <tr>
    <td>name:</td>
    <td><s:property value="#info.name"/></td>
    </tr>
    <tr>
    <td>registe_date:</td>
    <td><s:date name="#info.registe_date" format="yyyy-MM-dd HH:mm:ss"/></td>
    </tr>
    <tr>
    <td>birthday:</td>
    <td><s:date name="#info.birthday" format="yyyy-MM-dd"/></td>
    </tr>
    <tr>
    <td>image:</td>
    <td>
    <s:if test="#info.image_b==null">
    no image!
    </s:if>
    <s:else>
    <img alt="" src="<%=request.getContextPath()%>/viewImage.action?userNo=<s:property value="userNo"/>">
    </s:else>
    </td>
    </tr>
    </table>
  </body>
</html>
